package club.zhilin.guli.service.statistics.feign;

import club.zhilin.guli.common.base.result.CommonResult;
import club.zhilin.guli.service.statistics.feign.impl.IUserCenterMemberServiceImpl;
import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author zhilin
 * @since 2022/3/5 23:21
 */
@SuppressWarnings({"all"})
@FeignClient(value = "service-ucenter")
@SentinelResource(fallbackClass = IUserCenterMemberServiceImpl.class)
public interface IUserCenterMemberService {
    /**
     * 远程调用ucenter微服务中统计注册人数接口
     *
     * @param date 日期
     * @return commonResult
     */
    @GetMapping("/admin/ucenter/member/count/register/{date}")
    CommonResult<Integer> countRegister(@PathVariable("date") String date);

    /**
     * 远程调用ucenter微服务中统计登录人数接口
     *
     * @param date 日期
     * @return commonResult
     */
    @GetMapping("/admin/ucenter/member/count/login/{date}")
    CommonResult<Integer> countLogin(@PathVariable("date") String date);
}
